package com.prs.crm.dao.crm.impl;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Property;

import com.prs.crm.dao.crm.ProjectContractDao;
import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.domain.crm.CustomerProject;
import com.prs.crm.domain.crm.Linkman;
import com.prs.crm.domain.crm.ProjectContract;

public class ProjectContractDaoImpl extends BaseDaoImpl<ProjectContract> implements ProjectContractDao{

	@Override
	public List<ProjectContract> getContractByProject(
			CustomerProject customerProject) {
		Criteria criteria = this.getSession().createCriteria(ProjectContract.class);
		criteria.add(Property.forName("customerProject").eq(customerProject));
		return criteria.list();
	}

}
